package com.beifu.manager.dao;

import com.beifu.manager.model.Role;
import com.beifu.manager.model.RoleExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface RoleMapper {
    int countByExample(RoleExample example);

    int deleteByExample(RoleExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Role record);

    int insertSelective(Role record);

    List<Role> selectByExample(RoleExample example);

    Role selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByExample(@Param("record") Role record, @Param("example") RoleExample example);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);
    
    /**
     * 获取角色分页数据
     * @param role
     * @return
     */
    List<Role> getRolePage(@Param("start") int start, @Param("pageNum") int pageNum,  @Param("example")RoleExample example);

    /**
     * 批量删除角色
     * @param ids
     * @return
     */
    int batchDelRole(String[] ids);

    /**
     * 查询角色表maxid
     * @return
     */
    int selectMaxId();
}